<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <title>商城系统登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="__ASSETS__/common/i/favicon.ico"/>
    <link rel="stylesheet" href="__ASSETS__/store/css/login/style.css?v=<?= $version ?>"/>
</head>
<style>
    .copyright {
        /*display: none;*/
        margin: -40px auto 0 auto;
        padding: 2px 0;
        width: 600px;
        color: grey;
        /*background: #ccc;*/
        /*background: rgba(0, 0, 0, 0.4);*/
    }

    .copyright a {
        color: grey;
    }
    /*以下为3/17添加 更改后台登录样式*/
    .page-login-v3:before {
        left: -1rem;
        width: 40%;
        /*background: url(__ASSETS__/store/img/login/bg.png)!important;*/
        background-position: left!important;
        background-size: 99% 100%!important;
        background-repeat: no-repeat!important;
	}
	.brand-img{
	    display: none;
	}
	.login-body {
        width: 25%;
        margin: 75px 0 75px 20%;
	}
	.brand-text{
	    font-size: 30px !important;
        font-weight: 700 !important;
        color: #333333;
	}
	.form-group{
	    position: relative;
	}
    .form-group>input{
        padding-left: 40px;
        border: 1px solid #D0D0D0;
        height: 48px;
        border-radius: 7px;
    }
	.icon-user{
        position: absolute;
        left: 9px;
        z-index: 5;
        background-image: url(__ASSETS__/store/img/login/name.png);
        background-repeat: no-repeat;
        background-size: 100%;
        background-position: center;
        width: 24px;
        height: 48px;
    }
    .icon-pass{
        background-image: url(__ASSETS__/store/img/login/pass.png);
    }
    .login-form button{
        background: white;
        color: black;
        border: 1px solid;
        font-family: Source Han Sans CN-Bold, Source Han Sans CN;
        font-weight: 700;
    }

    @media only screen and (max-width:760px) {
        .page-login-v3:before{
            width: 100%;
        }
        .login-body{
            width: 90%;
            margin: 75px auto;
        }
    }
</style>
<body class="page-login-v3">
<div class="container">
    <div id="wrapper" class="login-body">
        <div class="login-content">
             <img alt="logo" class="brand-img" src="__ASSETS__/store/img/login/logo.png?v=<?= $version ?>">
            <div class="brand">
               
                <h2 class="brand-text"><?= $setting->name ?></h2>
            </div>
            <form id="login-form" class="login-form">
                <div class="form-group">
                    <span class="icon-user"></span>
                    <input class="" name="User[user_name]" placeholder="请输入用户名" type="text" required>
                </div>
                <div class="form-group">
                    <span class="icon-user icon-pass"></span>
                    <input class="" name="User[password]" placeholder="请输入密码" type="password" required>
                </div>
                <div class="form-group">
                    <button id="btn-submit" type="submit">
                        登录
                    </button>
                </div>
            </form>
        </div>
    </div>
    <div class="copyright">
        <span>Copyright ©2020 <a href="https://www.baidu.com/" target="_blank"><?= $setting->icp ?></a></span>
    </div>
</div>
</body>
<script src="__ASSETS__/common/js/jquery.min.js"></script>
<script src="__ASSETS__/common/plugins/layer/layer.js?v=<?= $version ?>"></script>
<script src="__ASSETS__/common/js/jquery.form.min.js"></script>
<script>
    $(function () {
        // 表单提交
        var $form = $('#login-form');
        $form.submit(function () {
            var $btn_submit = $('#btn-submit');
            $btn_submit.attr("disabled", true);
            $form.ajaxSubmit({
                type: "post",
                dataType: "json",
                // url: '',
                success: function (result) {
                    $btn_submit.attr('disabled', false);
                    if (result.code === 1) {
                        layer.msg(result.msg, {time: 1500, anim: 1}, function () {
                            window.location = result.url;
                        });
                        return true;
                    }
                    layer.msg(result.msg, {time: 1500, anim: 6});
                }
            });
            return false;
        });
    });
</script>
</html>
